import axiosApi from '../AxiosApi.js'

const apiList = {
    version: '/platform/initVersion',
    page: '/platform/initVersion/page',
    query: '/platform/initVersion/query'
}

export default {
    get(data) {
        return axiosApi({
            method: 'GET',
            url: apiList.version + '/' + data
        })
    },
    add(data) {
        return axiosApi({
            method: 'POST',
            headers: {'Content-Type': 'application/json;charset=UTF-8'},
            url: apiList.version,
            data
        })
    },
    update(data) {
        return axiosApi({
            method: 'PUT',
            headers: {'Content-Type': 'application/json;charset=UTF-8'},
            url: apiList.version,
            data
        })
    },
    delete(data) {
        return axiosApi({
            method: 'DELETE',
            url: apiList.version,
            data
        })
    },
    page(data) {
        return axiosApi({
            method: 'POST',
            headers: {'Content-Type': 'application/json;charset=UTF-8'},
            url: apiList.page,
            data
        })
    },
    query(data) {
        return axiosApi({
            method: 'POST',
            headers: {'Content-Type': 'application/json;charset=UTF-8'},
            url: apiList.query,
            data
        })
    }
}
